import { http } from "@/utils/http";
import { PageRequest } from "@/api/model/baseModel";
import { OnlineInfo } from "@/api/model/onlineModel";

enum Api {
  OnlineList = "/online/list",
  Kickout = "/online/kickout",
}

export function getOnlineList(param: PageRequest) {
  return http.get<OnlineInfo[]>({
    url: Api.OnlineList,
    params: param,
  });
}

export function kickout(tokenValue: string) {
  return http.post<boolean>({
    url: Api.Kickout,
    params: {
      tokenValue,
    },
  });
}
